package cn.iphone.NPlayer.service.impl;

import cn.iphone.NPlayer.CourseDoc;
import cn.iphone.NPlayer.repository.CourseEsRepository;
import cn.iphone.NPlayer.service.ICourseEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseEsServiceImpl implements ICourseEsService {
    @Autowired
    private CourseEsRepository courseEsRepository;
    @Override
    public void onLineCourse(CourseDoc courseDoc) {
        courseEsRepository.save(courseDoc);
    }

    @Override
    public void offLineCourse(Long courseId) {
        courseEsRepository.deleteById(courseId);
    }


}
